import request from "@/utils/request.js"

export const getList = () => {
    return request({
        url: "/dept", 
        method: 'get'
    })
}

export const addDept = (data) => {
    return request({
        url: '/dept',
        method: 'post',
        data: data
    })
}

export const deleteDept = (id) => {
    return request({
        url: `/dept/${id}`,
        method: 'delete',
    })
}

export const editDept = (data) => {
    return request({
        url: '/dept', 
        method: 'put',
        data: data
    })
}